//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS ChimeSDKIdentity service.
///
/// The Amazon Chime SDK Identity APIs in this section allow software developers to create and manage unique instances of their messaging applications. These APIs provide the overarching framework for creating and sending messages. For more information about the identity APIs, refer to Amazon Chime SDK identity.
public struct ChimeSDKIdentity: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the ChimeSDKIdentity client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "ChimeSDKIdentity",
            serviceIdentifier: "identity-chime",
            signingName: "chime",
            serviceProtocol: .restjson,
            apiVersion: "2021-04-20",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: ChimeSDKIdentityErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "us-east-1": "identity-chime-fips.us-east-1.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Creates an Amazon Chime SDK messaging AppInstance under an AWS account. Only SDK messaging customers use this API. CreateAppInstance supports idempotency behavior as described in the AWS API Standard. identity
    @Sendable
    @inlinable
    public func createAppInstance(_ input: CreateAppInstanceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAppInstanceResponse {
        try await self.client.execute(
            operation: "CreateAppInstance", 
            path: "/app-instances", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an Amazon Chime SDK messaging AppInstance under an AWS account. Only SDK messaging customers use this API. CreateAppInstance supports idempotency behavior as described in the AWS API Standard. identity
    ///
    /// Parameters:
    ///   - clientRequestToken: The unique ID of the request. Use different tokens to create different AppInstances.
    ///   - metadata: The metadata of the AppInstance. Limited to a 1KB string in UTF-8.
    ///   - name: The name of the AppInstance.
    ///   - tags: Tags assigned to the AppInstance.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAppInstance(
        clientRequestToken: String = CreateAppInstanceRequest.idempotencyToken(),
        metadata: String? = nil,
        name: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAppInstanceResponse {
        let input = CreateAppInstanceRequest(
            clientRequestToken: clientRequestToken, 
            metadata: metadata, 
            name: name, 
            tags: tags
        )
        return try await self.createAppInstance(input, logger: logger)
    }

    /// Promotes an AppInstanceUser or AppInstanceBot to an  AppInstanceAdmin. The promoted entity can perform the following actions.     ChannelModerator actions across all channels in the AppInstance.    DeleteChannelMessage actions.   Only an AppInstanceUser and AppInstanceBot can be promoted to an AppInstanceAdmin role.
    @Sendable
    @inlinable
    public func createAppInstanceAdmin(_ input: CreateAppInstanceAdminRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAppInstanceAdminResponse {
        try await self.client.execute(
            operation: "CreateAppInstanceAdmin", 
            path: "/app-instances/{AppInstanceArn}/admins", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Promotes an AppInstanceUser or AppInstanceBot to an  AppInstanceAdmin. The promoted entity can perform the following actions.     ChannelModerator actions across all channels in the AppInstance.    DeleteChannelMessage actions.   Only an AppInstanceUser and AppInstanceBot can be promoted to an AppInstanceAdmin role.
    ///
    /// Parameters:
    ///   - appInstanceAdminArn: The ARN of the administrator of the current AppInstance.
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAppInstanceAdmin(
        appInstanceAdminArn: String,
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAppInstanceAdminResponse {
        let input = CreateAppInstanceAdminRequest(
            appInstanceAdminArn: appInstanceAdminArn, 
            appInstanceArn: appInstanceArn
        )
        return try await self.createAppInstanceAdmin(input, logger: logger)
    }

    /// Creates a bot under an Amazon Chime AppInstance. The request consists of a  unique Configuration and Name for that bot.
    @Sendable
    @inlinable
    public func createAppInstanceBot(_ input: CreateAppInstanceBotRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAppInstanceBotResponse {
        try await self.client.execute(
            operation: "CreateAppInstanceBot", 
            path: "/app-instance-bots", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a bot under an Amazon Chime AppInstance. The request consists of a  unique Configuration and Name for that bot.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance request.
    ///   - clientRequestToken: The unique ID for the client making the request. Use different tokens for different AppInstanceBots.
    ///   - configuration: Configuration information about the Amazon Lex V2 V2 bot.
    ///   - metadata: The request metadata. Limited to a 1KB string in UTF-8.
    ///   - name: The user's name.
    ///   - tags: The tags assigned to the AppInstanceBot.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAppInstanceBot(
        appInstanceArn: String,
        clientRequestToken: String = CreateAppInstanceBotRequest.idempotencyToken(),
        configuration: Configuration,
        metadata: String? = nil,
        name: String? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAppInstanceBotResponse {
        let input = CreateAppInstanceBotRequest(
            appInstanceArn: appInstanceArn, 
            clientRequestToken: clientRequestToken, 
            configuration: configuration, 
            metadata: metadata, 
            name: name, 
            tags: tags
        )
        return try await self.createAppInstanceBot(input, logger: logger)
    }

    /// Creates a user under an Amazon Chime AppInstance. The request consists of a unique appInstanceUserId and Name for that user.
    @Sendable
    @inlinable
    public func createAppInstanceUser(_ input: CreateAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAppInstanceUserResponse {
        try await self.client.execute(
            operation: "CreateAppInstanceUser", 
            path: "/app-instance-users", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a user under an Amazon Chime AppInstance. The request consists of a unique appInstanceUserId and Name for that user.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance request.
    ///   - appInstanceUserId: The user ID of the AppInstance.
    ///   - clientRequestToken: The unique ID of the request. Use different tokens to request additional AppInstances.
    ///   - expirationSettings: Settings that control the interval after which the AppInstanceUser is automatically deleted.
    ///   - metadata: The request's metadata. Limited to a 1KB string in UTF-8.
    ///   - name: The user's name.
    ///   - tags: Tags assigned to the AppInstanceUser.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAppInstanceUser(
        appInstanceArn: String,
        appInstanceUserId: String,
        clientRequestToken: String = CreateAppInstanceUserRequest.idempotencyToken(),
        expirationSettings: ExpirationSettings? = nil,
        metadata: String? = nil,
        name: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAppInstanceUserResponse {
        let input = CreateAppInstanceUserRequest(
            appInstanceArn: appInstanceArn, 
            appInstanceUserId: appInstanceUserId, 
            clientRequestToken: clientRequestToken, 
            expirationSettings: expirationSettings, 
            metadata: metadata, 
            name: name, 
            tags: tags
        )
        return try await self.createAppInstanceUser(input, logger: logger)
    }

    /// Deletes an AppInstance and all associated data asynchronously.
    @Sendable
    @inlinable
    public func deleteAppInstance(_ input: DeleteAppInstanceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteAppInstance", 
            path: "/app-instances/{AppInstanceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an AppInstance and all associated data asynchronously.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAppInstance(
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteAppInstanceRequest(
            appInstanceArn: appInstanceArn
        )
        return try await self.deleteAppInstance(input, logger: logger)
    }

    /// Demotes an AppInstanceAdmin to an AppInstanceUser or  AppInstanceBot. This action does not delete the user.
    @Sendable
    @inlinable
    public func deleteAppInstanceAdmin(_ input: DeleteAppInstanceAdminRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteAppInstanceAdmin", 
            path: "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Demotes an AppInstanceAdmin to an AppInstanceUser or  AppInstanceBot. This action does not delete the user.
    ///
    /// Parameters:
    ///   - appInstanceAdminArn: The ARN of the AppInstance's administrator.
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAppInstanceAdmin(
        appInstanceAdminArn: String,
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteAppInstanceAdminRequest(
            appInstanceAdminArn: appInstanceAdminArn, 
            appInstanceArn: appInstanceArn
        )
        return try await self.deleteAppInstanceAdmin(input, logger: logger)
    }

    /// Deletes an AppInstanceBot.
    @Sendable
    @inlinable
    public func deleteAppInstanceBot(_ input: DeleteAppInstanceBotRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteAppInstanceBot", 
            path: "/app-instance-bots/{AppInstanceBotArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an AppInstanceBot.
    ///
    /// Parameters:
    ///   - appInstanceBotArn: The ARN of the AppInstanceBot being deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAppInstanceBot(
        appInstanceBotArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteAppInstanceBotRequest(
            appInstanceBotArn: appInstanceBotArn
        )
        return try await self.deleteAppInstanceBot(input, logger: logger)
    }

    /// Deletes an AppInstanceUser.
    @Sendable
    @inlinable
    public func deleteAppInstanceUser(_ input: DeleteAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteAppInstanceUser", 
            path: "/app-instance-users/{AppInstanceUserArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an AppInstanceUser.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the user request being deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAppInstanceUser(
        appInstanceUserArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn
        )
        return try await self.deleteAppInstanceUser(input, logger: logger)
    }

    /// Deregisters an AppInstanceUserEndpoint.
    @Sendable
    @inlinable
    public func deregisterAppInstanceUserEndpoint(_ input: DeregisterAppInstanceUserEndpointRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeregisterAppInstanceUserEndpoint", 
            path: "/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deregisters an AppInstanceUserEndpoint.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - endpointId: The unique identifier of the AppInstanceUserEndpoint.
    ///   - logger: Logger use during operation
    @inlinable
    public func deregisterAppInstanceUserEndpoint(
        appInstanceUserArn: String,
        endpointId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeregisterAppInstanceUserEndpointRequest(
            appInstanceUserArn: appInstanceUserArn, 
            endpointId: endpointId
        )
        return try await self.deregisterAppInstanceUserEndpoint(input, logger: logger)
    }

    /// Returns the full details of an AppInstance.
    @Sendable
    @inlinable
    public func describeAppInstance(_ input: DescribeAppInstanceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAppInstanceResponse {
        try await self.client.execute(
            operation: "DescribeAppInstance", 
            path: "/app-instances/{AppInstanceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of an AppInstance.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAppInstance(
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAppInstanceResponse {
        let input = DescribeAppInstanceRequest(
            appInstanceArn: appInstanceArn
        )
        return try await self.describeAppInstance(input, logger: logger)
    }

    /// Returns the full details of an AppInstanceAdmin.
    @Sendable
    @inlinable
    public func describeAppInstanceAdmin(_ input: DescribeAppInstanceAdminRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAppInstanceAdminResponse {
        try await self.client.execute(
            operation: "DescribeAppInstanceAdmin", 
            path: "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of an AppInstanceAdmin.
    ///
    /// Parameters:
    ///   - appInstanceAdminArn: The ARN of the AppInstanceAdmin.
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAppInstanceAdmin(
        appInstanceAdminArn: String,
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAppInstanceAdminResponse {
        let input = DescribeAppInstanceAdminRequest(
            appInstanceAdminArn: appInstanceAdminArn, 
            appInstanceArn: appInstanceArn
        )
        return try await self.describeAppInstanceAdmin(input, logger: logger)
    }

    /// The AppInstanceBot's information.
    @Sendable
    @inlinable
    public func describeAppInstanceBot(_ input: DescribeAppInstanceBotRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAppInstanceBotResponse {
        try await self.client.execute(
            operation: "DescribeAppInstanceBot", 
            path: "/app-instance-bots/{AppInstanceBotArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// The AppInstanceBot's information.
    ///
    /// Parameters:
    ///   - appInstanceBotArn: The ARN of the AppInstanceBot.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAppInstanceBot(
        appInstanceBotArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAppInstanceBotResponse {
        let input = DescribeAppInstanceBotRequest(
            appInstanceBotArn: appInstanceBotArn
        )
        return try await self.describeAppInstanceBot(input, logger: logger)
    }

    /// Returns the full details of an AppInstanceUser.
    @Sendable
    @inlinable
    public func describeAppInstanceUser(_ input: DescribeAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAppInstanceUserResponse {
        try await self.client.execute(
            operation: "DescribeAppInstanceUser", 
            path: "/app-instance-users/{AppInstanceUserArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of an AppInstanceUser.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAppInstanceUser(
        appInstanceUserArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAppInstanceUserResponse {
        let input = DescribeAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn
        )
        return try await self.describeAppInstanceUser(input, logger: logger)
    }

    /// Returns the full details of an AppInstanceUserEndpoint.
    @Sendable
    @inlinable
    public func describeAppInstanceUserEndpoint(_ input: DescribeAppInstanceUserEndpointRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAppInstanceUserEndpointResponse {
        try await self.client.execute(
            operation: "DescribeAppInstanceUserEndpoint", 
            path: "/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of an AppInstanceUserEndpoint.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - endpointId: The unique identifier of the AppInstanceUserEndpoint.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAppInstanceUserEndpoint(
        appInstanceUserArn: String,
        endpointId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAppInstanceUserEndpointResponse {
        let input = DescribeAppInstanceUserEndpointRequest(
            appInstanceUserArn: appInstanceUserArn, 
            endpointId: endpointId
        )
        return try await self.describeAppInstanceUserEndpoint(input, logger: logger)
    }

    /// Gets the retention settings for an AppInstance.
    @Sendable
    @inlinable
    public func getAppInstanceRetentionSettings(_ input: GetAppInstanceRetentionSettingsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAppInstanceRetentionSettingsResponse {
        try await self.client.execute(
            operation: "GetAppInstanceRetentionSettings", 
            path: "/app-instances/{AppInstanceArn}/retention-settings", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the retention settings for an AppInstance.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAppInstanceRetentionSettings(
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAppInstanceRetentionSettingsResponse {
        let input = GetAppInstanceRetentionSettingsRequest(
            appInstanceArn: appInstanceArn
        )
        return try await self.getAppInstanceRetentionSettings(input, logger: logger)
    }

    /// Returns a list of the administrators in the AppInstance.
    @Sendable
    @inlinable
    public func listAppInstanceAdmins(_ input: ListAppInstanceAdminsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAppInstanceAdminsResponse {
        try await self.client.execute(
            operation: "ListAppInstanceAdmins", 
            path: "/app-instances/{AppInstanceArn}/admins", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of the administrators in the AppInstance.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - maxResults: The maximum number of administrators that you want to return.
    ///   - nextToken: The token returned from previous API requests until the number of administrators is reached.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAppInstanceAdmins(
        appInstanceArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAppInstanceAdminsResponse {
        let input = ListAppInstanceAdminsRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAppInstanceAdmins(input, logger: logger)
    }

    /// Lists all AppInstanceBots created under a single AppInstance.
    @Sendable
    @inlinable
    public func listAppInstanceBots(_ input: ListAppInstanceBotsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAppInstanceBotsResponse {
        try await self.client.execute(
            operation: "ListAppInstanceBots", 
            path: "/app-instance-bots", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all AppInstanceBots created under a single AppInstance.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - maxResults: The maximum number of requests to return.
    ///   - nextToken: The token passed by previous API calls until all requested bots are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAppInstanceBots(
        appInstanceArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAppInstanceBotsResponse {
        let input = ListAppInstanceBotsRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAppInstanceBots(input, logger: logger)
    }

    /// Lists all the AppInstanceUserEndpoints created under a single AppInstanceUser.
    @Sendable
    @inlinable
    public func listAppInstanceUserEndpoints(_ input: ListAppInstanceUserEndpointsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAppInstanceUserEndpointsResponse {
        try await self.client.execute(
            operation: "ListAppInstanceUserEndpoints", 
            path: "/app-instance-users/{AppInstanceUserArn}/endpoints", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the AppInstanceUserEndpoints created under a single AppInstanceUser.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - maxResults: The maximum number of endpoints that you want to return.
    ///   - nextToken: The token passed by previous API calls until all requested endpoints are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAppInstanceUserEndpoints(
        appInstanceUserArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAppInstanceUserEndpointsResponse {
        let input = ListAppInstanceUserEndpointsRequest(
            appInstanceUserArn: appInstanceUserArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAppInstanceUserEndpoints(input, logger: logger)
    }

    /// List all AppInstanceUsers created under a single AppInstance.
    @Sendable
    @inlinable
    public func listAppInstanceUsers(_ input: ListAppInstanceUsersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAppInstanceUsersResponse {
        try await self.client.execute(
            operation: "ListAppInstanceUsers", 
            path: "/app-instance-users", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List all AppInstanceUsers created under a single AppInstance.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - maxResults: The maximum number of requests that you want returned.
    ///   - nextToken: The token passed by previous API calls until all requested users are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAppInstanceUsers(
        appInstanceArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAppInstanceUsersResponse {
        let input = ListAppInstanceUsersRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAppInstanceUsers(input, logger: logger)
    }

    /// Lists all Amazon Chime AppInstances created under a single AWS account.
    @Sendable
    @inlinable
    public func listAppInstances(_ input: ListAppInstancesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAppInstancesResponse {
        try await self.client.execute(
            operation: "ListAppInstances", 
            path: "/app-instances", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all Amazon Chime AppInstances created under a single AWS account.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of AppInstances that you want to return.
    ///   - nextToken: The token passed by previous API requests until you reach the maximum number of AppInstances.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAppInstances(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAppInstancesResponse {
        let input = ListAppInstancesRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAppInstances(input, logger: logger)
    }

    /// Lists the tags applied to an Amazon Chime SDK identity resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the tags applied to an Amazon Chime SDK identity resource.
    ///
    /// Parameters:
    ///   - resourceARN: The ARN of the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Sets the amount of time in days that a given AppInstance retains data.
    @Sendable
    @inlinable
    public func putAppInstanceRetentionSettings(_ input: PutAppInstanceRetentionSettingsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutAppInstanceRetentionSettingsResponse {
        try await self.client.execute(
            operation: "PutAppInstanceRetentionSettings", 
            path: "/app-instances/{AppInstanceArn}/retention-settings", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sets the amount of time in days that a given AppInstance retains data.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - appInstanceRetentionSettings: The time in days to retain data. Data type: number.
    ///   - logger: Logger use during operation
    @inlinable
    public func putAppInstanceRetentionSettings(
        appInstanceArn: String,
        appInstanceRetentionSettings: AppInstanceRetentionSettings,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutAppInstanceRetentionSettingsResponse {
        let input = PutAppInstanceRetentionSettingsRequest(
            appInstanceArn: appInstanceArn, 
            appInstanceRetentionSettings: appInstanceRetentionSettings
        )
        return try await self.putAppInstanceRetentionSettings(input, logger: logger)
    }

    /// Sets the number of days before the AppInstanceUser is automatically deleted.  A background process deletes expired AppInstanceUsers within 6 hours of expiration.  Actual deletion times may vary. Expired AppInstanceUsers that have not yet been deleted appear as active, and you can update  their expiration settings. The system honors the new settings.
    @Sendable
    @inlinable
    public func putAppInstanceUserExpirationSettings(_ input: PutAppInstanceUserExpirationSettingsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutAppInstanceUserExpirationSettingsResponse {
        try await self.client.execute(
            operation: "PutAppInstanceUserExpirationSettings", 
            path: "/app-instance-users/{AppInstanceUserArn}/expiration-settings", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sets the number of days before the AppInstanceUser is automatically deleted.  A background process deletes expired AppInstanceUsers within 6 hours of expiration.  Actual deletion times may vary. Expired AppInstanceUsers that have not yet been deleted appear as active, and you can update  their expiration settings. The system honors the new settings.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - expirationSettings: Settings that control the interval after which an AppInstanceUser is automatically deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func putAppInstanceUserExpirationSettings(
        appInstanceUserArn: String,
        expirationSettings: ExpirationSettings? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutAppInstanceUserExpirationSettingsResponse {
        let input = PutAppInstanceUserExpirationSettingsRequest(
            appInstanceUserArn: appInstanceUserArn, 
            expirationSettings: expirationSettings
        )
        return try await self.putAppInstanceUserExpirationSettings(input, logger: logger)
    }

    /// Registers an endpoint under an Amazon Chime AppInstanceUser. The endpoint receives messages for a user. For push notifications, the endpoint is a mobile device used to receive mobile push notifications for a user.
    @Sendable
    @inlinable
    public func registerAppInstanceUserEndpoint(_ input: RegisterAppInstanceUserEndpointRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RegisterAppInstanceUserEndpointResponse {
        try await self.client.execute(
            operation: "RegisterAppInstanceUserEndpoint", 
            path: "/app-instance-users/{AppInstanceUserArn}/endpoints", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Registers an endpoint under an Amazon Chime AppInstanceUser. The endpoint receives messages for a user. For push notifications, the endpoint is a mobile device used to receive mobile push notifications for a user.
    ///
    /// Parameters:
    ///   - allowMessages: Boolean that controls whether the AppInstanceUserEndpoint is opted in to receive messages. ALL indicates the endpoint receives all messages.  NONE indicates the endpoint receives no messages.
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - clientRequestToken: The unique ID assigned to the request. Use different tokens to register other endpoints.
    ///   - endpointAttributes: The attributes of an Endpoint.
    ///   - name: The name of the AppInstanceUserEndpoint.
    ///   - resourceArn: The ARN of the resource to which the endpoint belongs.
    ///   - type: The type of the AppInstanceUserEndpoint. Supported types:    APNS: The mobile notification service for an Apple device.    APNS_SANDBOX: The sandbox environment of the mobile notification service for an Apple device.    GCM: The mobile notification service for an Android device.   Populate the ResourceArn value of each type as PinpointAppArn.
    ///   - logger: Logger use during operation
    @inlinable
    public func registerAppInstanceUserEndpoint(
        allowMessages: AllowMessages? = nil,
        appInstanceUserArn: String,
        clientRequestToken: String = RegisterAppInstanceUserEndpointRequest.idempotencyToken(),
        endpointAttributes: EndpointAttributes,
        name: String? = nil,
        resourceArn: String,
        type: AppInstanceUserEndpointType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RegisterAppInstanceUserEndpointResponse {
        let input = RegisterAppInstanceUserEndpointRequest(
            allowMessages: allowMessages, 
            appInstanceUserArn: appInstanceUserArn, 
            clientRequestToken: clientRequestToken, 
            endpointAttributes: endpointAttributes, 
            name: name, 
            resourceArn: resourceArn, 
            type: type
        )
        return try await self.registerAppInstanceUserEndpoint(input, logger: logger)
    }

    /// Applies the specified tags to the specified Amazon Chime SDK identity resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags?operation=tag-resource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Applies the specified tags to the specified Amazon Chime SDK identity resource.
    ///
    /// Parameters:
    ///   - resourceARN: The resource ARN.
    ///   - tags: The tag key-value pairs.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes the specified tags from the specified Amazon Chime SDK identity resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags?operation=untag-resource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the specified tags from the specified Amazon Chime SDK identity resource.
    ///
    /// Parameters:
    ///   - resourceARN: The resource ARN.
    ///   - tagKeys: The tag keys.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates AppInstance metadata.
    @Sendable
    @inlinable
    public func updateAppInstance(_ input: UpdateAppInstanceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAppInstanceResponse {
        try await self.client.execute(
            operation: "UpdateAppInstance", 
            path: "/app-instances/{AppInstanceArn}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates AppInstance metadata.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - metadata: The metadata that you want to change.
    ///   - name: The name that you want to change.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAppInstance(
        appInstanceArn: String,
        metadata: String,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAppInstanceResponse {
        let input = UpdateAppInstanceRequest(
            appInstanceArn: appInstanceArn, 
            metadata: metadata, 
            name: name
        )
        return try await self.updateAppInstance(input, logger: logger)
    }

    /// Updates the name and metadata of an AppInstanceBot.
    @Sendable
    @inlinable
    public func updateAppInstanceBot(_ input: UpdateAppInstanceBotRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAppInstanceBotResponse {
        try await self.client.execute(
            operation: "UpdateAppInstanceBot", 
            path: "/app-instance-bots/{AppInstanceBotArn}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the name and metadata of an AppInstanceBot.
    ///
    /// Parameters:
    ///   - appInstanceBotArn: The ARN of the AppInstanceBot.
    ///   - configuration: The configuration for the bot update.
    ///   - metadata: The metadata of the AppInstanceBot.
    ///   - name: The name of the AppInstanceBot.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAppInstanceBot(
        appInstanceBotArn: String,
        configuration: Configuration? = nil,
        metadata: String,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAppInstanceBotResponse {
        let input = UpdateAppInstanceBotRequest(
            appInstanceBotArn: appInstanceBotArn, 
            configuration: configuration, 
            metadata: metadata, 
            name: name
        )
        return try await self.updateAppInstanceBot(input, logger: logger)
    }

    /// Updates the details of an AppInstanceUser. You can update names and metadata.
    @Sendable
    @inlinable
    public func updateAppInstanceUser(_ input: UpdateAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAppInstanceUserResponse {
        try await self.client.execute(
            operation: "UpdateAppInstanceUser", 
            path: "/app-instance-users/{AppInstanceUserArn}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the details of an AppInstanceUser. You can update names and metadata.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - metadata: The metadata of the AppInstanceUser.
    ///   - name: The name of the AppInstanceUser.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAppInstanceUser(
        appInstanceUserArn: String,
        metadata: String,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAppInstanceUserResponse {
        let input = UpdateAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn, 
            metadata: metadata, 
            name: name
        )
        return try await self.updateAppInstanceUser(input, logger: logger)
    }

    /// Updates the details of an AppInstanceUserEndpoint. You can update the name and AllowMessage values.
    @Sendable
    @inlinable
    public func updateAppInstanceUserEndpoint(_ input: UpdateAppInstanceUserEndpointRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAppInstanceUserEndpointResponse {
        try await self.client.execute(
            operation: "UpdateAppInstanceUserEndpoint", 
            path: "/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the details of an AppInstanceUserEndpoint. You can update the name and AllowMessage values.
    ///
    /// Parameters:
    ///   - allowMessages: Boolean that controls whether the AppInstanceUserEndpoint is opted in to receive messages. ALL indicates the endpoint will receive all messages.  NONE indicates the endpoint will receive no messages.
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - endpointId: The unique identifier of the AppInstanceUserEndpoint.
    ///   - name: The name of the AppInstanceUserEndpoint.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAppInstanceUserEndpoint(
        allowMessages: AllowMessages? = nil,
        appInstanceUserArn: String,
        endpointId: String,
        name: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAppInstanceUserEndpointResponse {
        let input = UpdateAppInstanceUserEndpointRequest(
            allowMessages: allowMessages, 
            appInstanceUserArn: appInstanceUserArn, 
            endpointId: endpointId, 
            name: name
        )
        return try await self.updateAppInstanceUserEndpoint(input, logger: logger)
    }
}

extension ChimeSDKIdentity {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: ChimeSDKIdentity, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension ChimeSDKIdentity {
    /// Return PaginatorSequence for operation ``listAppInstanceAdmins(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceAdminsPaginator(
        _ input: ListAppInstanceAdminsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAppInstanceAdminsRequest, ListAppInstanceAdminsResponse> {
        return .init(
            input: input,
            command: self.listAppInstanceAdmins,
            inputKey: \ListAppInstanceAdminsRequest.nextToken,
            outputKey: \ListAppInstanceAdminsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAppInstanceAdmins(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - maxResults: The maximum number of administrators that you want to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceAdminsPaginator(
        appInstanceArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAppInstanceAdminsRequest, ListAppInstanceAdminsResponse> {
        let input = ListAppInstanceAdminsRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults
        )
        return self.listAppInstanceAdminsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAppInstanceBots(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceBotsPaginator(
        _ input: ListAppInstanceBotsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAppInstanceBotsRequest, ListAppInstanceBotsResponse> {
        return .init(
            input: input,
            command: self.listAppInstanceBots,
            inputKey: \ListAppInstanceBotsRequest.nextToken,
            outputKey: \ListAppInstanceBotsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAppInstanceBots(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - maxResults: The maximum number of requests to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceBotsPaginator(
        appInstanceArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAppInstanceBotsRequest, ListAppInstanceBotsResponse> {
        let input = ListAppInstanceBotsRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults
        )
        return self.listAppInstanceBotsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAppInstanceUserEndpoints(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceUserEndpointsPaginator(
        _ input: ListAppInstanceUserEndpointsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAppInstanceUserEndpointsRequest, ListAppInstanceUserEndpointsResponse> {
        return .init(
            input: input,
            command: self.listAppInstanceUserEndpoints,
            inputKey: \ListAppInstanceUserEndpointsRequest.nextToken,
            outputKey: \ListAppInstanceUserEndpointsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAppInstanceUserEndpoints(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceUserArn: The ARN of the AppInstanceUser.
    ///   - maxResults: The maximum number of endpoints that you want to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceUserEndpointsPaginator(
        appInstanceUserArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAppInstanceUserEndpointsRequest, ListAppInstanceUserEndpointsResponse> {
        let input = ListAppInstanceUserEndpointsRequest(
            appInstanceUserArn: appInstanceUserArn, 
            maxResults: maxResults
        )
        return self.listAppInstanceUserEndpointsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAppInstanceUsers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceUsersPaginator(
        _ input: ListAppInstanceUsersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAppInstanceUsersRequest, ListAppInstanceUsersResponse> {
        return .init(
            input: input,
            command: self.listAppInstanceUsers,
            inputKey: \ListAppInstanceUsersRequest.nextToken,
            outputKey: \ListAppInstanceUsersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAppInstanceUsers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - maxResults: The maximum number of requests that you want returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstanceUsersPaginator(
        appInstanceArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAppInstanceUsersRequest, ListAppInstanceUsersResponse> {
        let input = ListAppInstanceUsersRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults
        )
        return self.listAppInstanceUsersPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAppInstances(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstancesPaginator(
        _ input: ListAppInstancesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAppInstancesRequest, ListAppInstancesResponse> {
        return .init(
            input: input,
            command: self.listAppInstances,
            inputKey: \ListAppInstancesRequest.nextToken,
            outputKey: \ListAppInstancesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAppInstances(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of AppInstances that you want to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppInstancesPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAppInstancesRequest, ListAppInstancesResponse> {
        let input = ListAppInstancesRequest(
            maxResults: maxResults
        )
        return self.listAppInstancesPaginator(input, logger: logger)
    }
}

extension ChimeSDKIdentity.ListAppInstanceAdminsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKIdentity.ListAppInstanceAdminsRequest {
        return .init(
            appInstanceArn: self.appInstanceArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKIdentity.ListAppInstanceBotsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKIdentity.ListAppInstanceBotsRequest {
        return .init(
            appInstanceArn: self.appInstanceArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKIdentity.ListAppInstanceUserEndpointsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKIdentity.ListAppInstanceUserEndpointsRequest {
        return .init(
            appInstanceUserArn: self.appInstanceUserArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKIdentity.ListAppInstanceUsersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKIdentity.ListAppInstanceUsersRequest {
        return .init(
            appInstanceArn: self.appInstanceArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKIdentity.ListAppInstancesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKIdentity.ListAppInstancesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
